package dao

import (
	"github.com/astaxie/beego/orm"
	_ "github.com/go-sql-driver/mysql"

	"learn-otp/config"
	"learn-otp/models"
)

func init() {
	// set default database
	orm.RegisterDriver("mysql", orm.DRMySQL)
	orm.RegisterDataBase("default", "mysql", config.MysqlUrl, 1, 3)

	orm.RegisterModel(new(models.User))

	// orm.Debug = true
}
